/* 基础样式 */
/* 增强内容可读性 */
.container {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);  /* 更强的阴影增加层次感 */
}

.section {
    background-color: rgba(255, 255, 255, 0.95);  /* 更不透明的背景 */
    border: 1px solid rgba(0, 0, 0, 0.05);  /* 添加细微边框 */
}

.sidebar {
    background-color: rgba(44, 62, 80, 0.95);  /* 更不透明的侧边栏 */
}
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #2ecc71;
    --info-color: #3498db;
    --sidebar-width: 300px;
    --sidebar-mobile-height: 80px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

/* 布局样式 */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 侧边栏样式 */
.profile {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--success-color);
    border: 3px solid var(--dark-color);
}

.profile h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: white;
}

.title {
    color: var(--gray-color);
    font-size: 16px;
    margin-bottom: 20px;
}

.contact-info, .skills, .languages {
    margin-bottom: 30px;
}

.contact-info h2, .skills h2, .languages h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-info ul li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* 技能条样式 */
.skill-category {
    margin-bottom: 20px;
}

.skill-category h3 {
    color: var(--light-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.skill-bar {
    margin-bottom: 15px;
}

.skill-bar span {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--light-color);
}

.bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

/* 语言能力样式 */
.language {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.language span {
    font-size: 13px;
    color: var(--light-color);
}

.stars {
    color: var(--warning-color);
}

.stars .far {
    color: rgba(255, 255, 255, 0.1);
}

/* 主内容区样式 */
.main-nav {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 10px;
}

.main-nav ul {
    display: flex;
    justify-content: space-around;
}

.main-nav ul li a {
    padding: 10px 15px;
    color: var(--gray-color);
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.main-nav ul li a i {
    margin-right: 8px;
}

.main-nav ul li a:hover, .main-nav ul li a.active {
    color: white;
    background-color: var(--primary-color);
}

.section {
    display: none;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section.active-section {
    display: block;
    animation: fadeIn 0.5s ease;
}

.section h2 {
    font-size: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* 关于我部分 */
.interests {
    margin-top: 30px;
}

.interest-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.interest-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.interest-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.interest-item i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

/* 时间线样式 */
/* 时间线样式 - 最终优化版 */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 25px; /* 下移时间线起点 */
    left: 20px;
    height: calc(100% - 25px); /* 调整高度 */
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px; /* 增加项目间距 */
}

.timeline-date {
    position: absolute;
    left: 0;
    top: -10px; /* 将日期完全移到内容上方 */
    background-color: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1; /* 确保日期显示在内容上方 */
}

.timeline-content {
    background-color: #f8f9fa;
    padding: 25px 20px 20px; /* 增加上内边距 */
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    position: relative;
    margin-top: 15px; /* 为日期留出空间 */
}



/* ================= 响应式设计优化 ================= */
/* 超大屏幕 (≥1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        margin: 30px auto;
    }
}

/* 中等屏幕 (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
        margin: 25px auto;
    }
    .sidebar {
        width: 280px;
    }
}

/* 小屏幕 (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        flex-direction: column;
        max-width: 720px;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 20px;
    }
    .profile {
        width: 100%;
        margin-bottom: 20px;
    }
    .contact-info, .skills, .languages {
        width: calc(50% - 15px);
    }
    .main-content {
        padding: 20px;
    }
}

/* 超小屏幕 (576px-767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        margin: 15px;
    }
    .sidebar {
        flex-direction: column;
    }
    .contact-info, .skills, .languages {
        width: 100%;
    }
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
    #backToTop {
        bottom: 100px;
        right: 20px;
    }
    #printResume {
        bottom: 160px;
    }
}

/* 极小屏幕 (≤575px) - 移动端优化 */
@media (max-width: 575px) {
    .container {
        margin: 10px;
        border-radius: 0;
    }
    .sidebar {
        padding: 15px;
        border-radius: 0;
    }
    .avatar-container {
        width: 100px;
        height: 100px;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }
    .main-nav ul li {
        margin-bottom: 5px;
    }
    .main-nav ul li a {
        justify-content: center;
    }
    .section {
        padding: 20px 15px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .about-details {
        grid-template-columns: 1fr;
    }
    .timeline {
        padding-left: 30px;
    }
    .timeline-date {
        left: -30px;
        font-size: 11px;
    }
    .contact-container {
        grid-template-columns: 1fr;
    }
    #backToTop, #printResume {
        width: 45px;
        height: 45px;
        font-size: 0;
    }
    #backToTop {
        bottom: 80px;
        right: 15px;
    }
    #printResume {
        bottom: 140px;
        right: 15px;
    }
    #backToTop i, #printResume i {
        font-size: 18px;
        margin-right: 0;
    }
}

/* 特殊设备适配 - 折叠屏等 */
@media (max-width: 400px) {
    .detail-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .skill-bar span {
        font-size: 12px;
    }
    .project-tech span {
        font-size: 11px;
    }
}

/* 横屏模式适配 */
@media screen and (orientation: landscape) and (max-width: 900px) {
    .container {
        flex-direction: row;
    }
    .sidebar {
        width: 250px;
        height: 100vh;
        overflow-y: auto;
    }
    .main-content {
        height: 100vh;
        overflow-y: auto;
    }
    #backToTop {
        bottom: 20px;
    }
    #printResume {
        bottom: 80px;
    }
}
/* 项目卡片样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-header {
    padding: 15px 20px;
    background-color: var(--dark-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-header h3 {
    margin-bottom: 0;
    font-size: 16px;
}

.project-links a {
    color: white;
    margin-left: 10px;
    font-size: 14px;
}

.project-description {
    padding: 15px 20px;
    font-size: 14px;
    color: #555;
}

.project-tech {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    background-color: #e0e0e0;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
}

/* 证书样式 */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.cert-item {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.cert-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
}

.cert-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cert-item span {
    font-size: 12px;
    color: var(--gray-color);
}

/* 联系表单样式 */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn i {
    margin-left: 5px;
}

.contact-info-main h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.contact-info-main ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info-main ul li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: var(--dark-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.qr-code {
    margin-top: 30px;
    text-align: center;
}

.qr-code img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
}

.qr-code p {
    font-size: 14px;
    color: var(--gray-color);
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--dark-color);
    color: white;
    font-size: 14px;
}

.footer p {
    margin-bottom: 5px;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 99;
}

#backToTop:hover {
    transform: translateY(-5px);
}

/* 全页面粒子背景样式 */
/* 增强粒子容器样式 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #e6f0f8 0%, #d0e0ed 100%); /* 更明显的渐变背景 */
    pointer-events: none;
}

/* 调整主容器透明度 */
.container {
    background-color: rgba(255, 255, 255, 0.85); /* 稍微降低透明度 */
}

/* 调整侧边栏背景为半透明深色 */
.sidebar {
    background-color: rgba(44, 62, 80, 0.9); /* 半透明深色 */
}
/* 打印按钮样式 */
#printResume {
    position: fixed;
    bottom: 80px;
    right: 100px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--dark-color), #444);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 99;
    opacity: 0.8;
    font-weight: 500;
}

#printResume:hover {
    opacity: 1;
    transform: translateY(-3px);
}

#printResume i {
    margin-right: 8px;
}

/* 关于我部分新增样式 */
.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.detail-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 3px;
}

.detail-item h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.detail-item p {
    font-size: 14px;
    color: #666;
}

.career-goals, .technical-highlights {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.career-goals h3, .technical-highlights h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.technical-highlights ul {
    margin-left: 20px;
}

.technical-highlights ul li {
    list-style-type: disc;
    margin-bottom: 8px;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .about-details {
        grid-template-columns: 1fr;
    }
    
    #printResume {
        bottom: 140px;
        right: 20px;
        padding: 10px 15px;
        font-size: 14px;
    }
}